package com.hc.lucene.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hc.lucene.entity.Emp;
import com.hc.lucene.mapper.EmpMapper;
import com.hc.lucene.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    private EmpMapper empMapper;

    @Override
    public Emp selectById(Integer id) {
        return empMapper.selectById(id);
    }

    @Override
    public List<Emp> selectAll() {
        QueryWrapper<Emp> queryWrapper = new QueryWrapper<>();
        return empMapper.selectList(queryWrapper);
    }
}
